package com.p.lib.util;

import java.util.Calendar;

/**
 * 日历工具， 操作日历
 * Created by Administrator on 2018/7/2 0002.
 */

public class CalendarUtil {


    /**
     * 计算两个Calendar之间间隔几个晚上
     * @param startTime
     * @param endTime
     * @return
     */
    public static int getNightCount(Calendar startTime, Calendar endTime){

        int night = endTime.get(Calendar.DAY_OF_YEAR) - startTime.get(Calendar.DAY_OF_YEAR);

        return night;
    }

}
